package com.idea.zd.sys.train.io;

import java.io.*;

public class BufferedReaderTest {

    /**
     * 输入字节流
     * @param args
     * @throws IOException
     */
    public static void main(String args[]) throws IOException{

        File file = new File(".");
        for(String f:file.list()){
            //System.out.println(f);
        }
        //创建字节流
        FileInputStream fileInputStream = new FileInputStream("./src/main/java/com/idea/zd/sys/train/io/FileInputStreamTest.java");
        //FileInputStream fileInputStream = new FileInputStream("ss.fxml");

        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));

        //字节数组
        String tempStr = "";

        while((tempStr = bufferedReader.readLine())!=null){

            System.out.println(tempStr);
        }

        bufferedReader.close();
        fileInputStream.close();
    }
}
